package com.showcai.tools;

import java.util.Random;

/**
 * Created by Andrew  on 2016/11/19.
 */
public class RandomCode  extends  ToolsBase {
    public static String getCode(int n){
        String randomCode="";
        Random random=new Random();
        for (int i=0;i<n;i++){
            randomCode+=random.nextInt(10);
        }
        return randomCode;
    }
    public static String getCode(){
       return getCode(4);
    }
}
